#include <REGX52.H>

/**
 * 1357先亮，然后2468再亮，交替闪烁
 */

void delay_ms(unsigned int ms)
{
    unsigned int i, j;
    for (i = 0; i < ms; i++)
    {
        for (j = 0; j < 123; j++)
            ;
    }
}

void main()
{     
   while(1){
    //1010 1010
    P2 = 0xAA;
    delay_ms(200);
    P2 = 0x55;
    delay_ms(200);
   }
}